package com.itheima.controller;


import com.itheima.jopo.Account;
import com.itheima.Service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/account")

public class AccountController {

    @Autowired
    private AccountService accountService;

    @RequestMapping("/findAll")
    public String findAll(){
        System.out.println("进入了findAll....");
        List<Account> all = accountService.findAll();
        System.out.println(all);

        return "list";
    }
}
